-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement notify-only support #59
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #59 +/- ##
==========================================
+ Coverage 57.98% 60.65% +2.67%
==========================================
Files 8 9 +1
Lines 1397 1492 +95
Branches 264 294 +30
==========================================
+ Hits 810 905 +95
Misses 586 586
Partials 1 1
Continue to review full report at Codecov.
|
kennyg
approved these changes
Jan 13, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR implements
notify_only
support for policies, which can also be used indefaults.yml
to put an entire account into notify-only mode. This is controlled by anotify_only
boolean top-level policy key, which policygen then handles and strips out when generating the final custodian YAML files.The current functionality of notify-only is as follows:
comment
/comments
/description
fields will be prefixed with the stringNOTIFY ONLY:
tags
list, anotify-only
tag will be appended to it.-notify-only
appended to their tag names, to automate the above-described transition. Specifically:mark
ortag
actions in the actions list will have the string-notify-only
appended to theirtag
orkey
values (if present) or appended to every item in theirtags
list (if present). If none of the above are present, thetag
item will be set to custodian'sDEFAULT_TAG
value, with-notify-only
appended.mark-for-op
actions will have the string-notify-only
appended to theirtag
value. If they do not already have atag
value, it will be set to custodian'sDEFAULT_TAG
value, with-notify-only
appended.remove-tag
/unmark
/untag
actions wukk have the string-notify-only
appended to all items in theirtags
list.notify
actions will have theirviolation_desc
, if present, prefixed withNOTIFY ONLY:
. Theiraction_desc
, if present, will be prefixed within the future (currently notify-only)
.Testing Done